package com.example.kotlinlearn.kotlinLearn

import com.example.kotlinlearn.recycler.ListItem
import kotlin.math.max

fun main(){
    val list = listOf<Float>(0.3f,9.8f,1.3f,5f)
    val mutablelist = mutableListOf<Int>(1,3,4,5,3,2,1,1)
    val setlist = setOf<Double>(1.1,2.3,2.3,11.22)
    println(mutablelist)
    println(setlist)
    val list1:List<Int> = listOf(1,23,4,3435,5,3,35,35,1)
    var i = 1
    val s = 2

    i = 3
    println(getMax(1,2324))
    println(getMin(13142,35553535))
    println(getCenter(244,53535))

    if18(435)
}


fun getCenter(num1: Int,num2: Int) = if (num1>num2) num1 else num2

fun if18(age:Int){
    val s = if (age>=18) "可以进入" else "不可以进入"
    println(s)
}

